﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

class ShortSpear : Weapon
{
    public ShortSpear()
    {
        m_Price = 180;
        m_Type = ItemsType.WEAPON_SMALL_KINETICS_SHORT_SPEAR;
        m_DamageType = DamageType.TYPE_KINETIC;
        m_Speciality = Speciality.MAIN;
        ResearchInfluence = InfluenceMG.INFLUENCE_EARTH;
        ShutRange = 5f;
        ShutVelocity = 4.2f;
        BulletFlyVelocity = 8.8f;
        Damage = 110f;
        TurnSpeed = 80f;
        m_DropRate = 0.2f;
        m_ExplotionScale = 0.3f;
        Name = "短矛";
        Perview = "Textures/Weapon/WeaponSmall/ShortSpear";
        WeaponResource = "Perfabs/Weapon/Small/ShortSpear";
        BulletResource = "Perfabs/Bullet/ShortSpear";
        m_FireAudioResouce = "Perfabs/Audio/Pang";
        Description = "短矛是小型武器中口径最大的动能武器，强力的穿透力就连护盾也没办法挡住。较短的射程和较长的冷却时间是该武器的短板，虽然能够穿透护盾，但是对舰体的伤害太小。";

    }

    public override FlyItem Fire(GameObject ship, WeaponSlot slot, Vector3 position, Vector3 direction)
    {
        if (ship)
            m_Ship = ship.GetComponent<Ship>();
        Slot = slot;
        var item = base.Fire(ship, slot, position, direction);
        Bullet bullet = item as Bullet;
        if (bullet)
            bullet.m_Pierce = true;
        return item;
    }
}